package gttp.nspa.client.adm.activity;

import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.IsWidget;

public interface ICustomerForm extends IsWidget {

    public interface Presenter {

        void onSaveButtonClicked();

        void onDeleteButtonClicked();

        void onCancelButtonClicked();

        void onDeleteConfirmed();
    }

    void setPresenter(Presenter presenter);

    HasText id();

    HasText name();

    HasText address();

    HasText phone();

    HasText email();

    void prepareForCreating();

    void prepareForUpdating();

    void readyForEditing(boolean ready);

    void queryDeleting(long id, String name);

    void customerCreated(long id, String name);

    void customerUpdated(long id, String name);

    void customerDeleted(long id, String name);

    void canceled();

    void exceptionCaught(Throwable t);

    void show();

}
